cdef extern from "stdint.h":
    ctypedef unsigned long uint64_t
    ctypedef unsigned int  uint32_t

cdef extern from "stdbool.h":
    ctypedef unsigned short bool

cdef extern from "tcutil.h":
    ctypedef struct TCLIST
    ctypedef struct TCMAP

    int tclistnum(TCLIST *list)
    void *tclistval(TCLIST *list, int index, int *sp)
    void tclistdel(TCLIST *list)

    TCMAP *tcmapnew2(uint32_t bnum)
    void tcmapdel(TCMAP *map)
    void *tcmapget(TCMAP *map, void *kbuf, int ksiz, int *sp)
    void tcmapput2(TCMAP *map, char *kstr, char *vstr)
    void tcmapiterinit(TCMAP *map)
    void *tcmapiternext(TCMAP *map, int *sp)